import request from '@/utils/request'

// 查询考友点评列表
export function listComment(query) {
  return request({
    url: '/wjq/comment/list',
    method: 'get',
    params: query
  })
}

// 根据题目ID查询考友点评（不分页）
export function listCommentByQuestionId(questionId) {
  return request({
    url: '/wjq/comment/listByQuestionId/' + questionId,
    method: 'get'
  })
}

// 查询考友点评详细
export function getComment(id) {
  return request({
    url: '/wjq/comment/' + id,
    method: 'get'
  })
}

// 新增考友点评
export function addComment(data) {
  return request({
    url: '/wjq/comment',
    method: 'post',
    data: data
  })
}

// 修改考友点评
export function updateComment(data) {
  return request({
    url: '/wjq/comment',
    method: 'put',
    data: data
  })
}

// 删除考友点评
export function delComment(id) {
  return request({
    url: '/wjq/comment/' + id,
    method: 'delete'
  })
}
